#include "Bind.h"


Bind::Bind() :
	type(IQ_TYPE_SET)
{
}

std::string Bind::getChildElementXML() {
	std::string buf("<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">"); 
	if (!resource.empty()) {
		buf.append("<resource>").append(resource).append("</resource>");
	}
	if (!jid.empty()) {
		buf.append("<jid>").append(jid).append("</jid>");
	}
	buf.append("</bind>");
	return buf;
}
